package com.thinkgem.jeesite.cn.yy.service;

import com.thinkgem.jeesite.cn.yy.entity.ProTableCol;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by jws24 on 2017/12/1.
 */
@MyBatisDao
public interface SQLsService {
    /**
     *根据项目编号查表编号
     */
    List<Map<String,String>> pro ();
    /**
     * 根据项目编号查表编号
     */
    //
    List<Map<String,Object>> tab (@Param(value = "pro_id")int proId);
    /**
     * 根据表编号查表字段
     */
    List<ProTableCol> col (@Param(value = "tab_id")int tabId);
    /**
     * 根据项目编号查表名
     */
    List<Map<String,String>> proName(@Param(value = "pro_id")int proId);
    /**
     * 根据表编号查表名
     */
    List<Map<String,String>> tabName(@Param(value="tab_id")int tabId);

    List<Map<String,Object>> cid (@Param(value = "tab_id")int tabId);

    Map<String,String> name (@Param(value = "tab_id")int tabId,@Param(value = "col_cid")int colCid);

    Map<String,String> type (@Param(value = "tab_id")int tabId,@Param(value = "col_cid")int colCid);

    Map<String,Object> length(@Param(value = "tab_id")int tabId,@Param(value = "col_cid")int colCid);

    Map<String,Object> isNull(@Param(value = "tab_id")int tabId,@Param(value = "col_cid")int colCid);

    Map<String,String> restrict(@Param(value = "tab_id")int tabId,@Param(value = "col_cid")int colCid);

    int count (@Param(value = "tab_id")int tabId);


} 